<div class="agiledashboard-admin-kanban">
    <h1>{{ config_title }}</h1>

    <ul class="nav nav-tabs">
        <li class="active">
            <a href="?group_id={{ group_id }}&action=admin&pane=scrum">{{ scrum_label }}</a>
        </li>
        <li>
            <a href="?group_id={{ group_id }}&action=admin&pane=kanban">{{ kanban_label }}</a>
        </li>
    </ul>

    <form action="?group_id={{ group_id }}&action=updateConfiguration" method="POST">
        <input type="hidden" name="activate-scrum" value="0">

        {{# can_scrum_mono_milestone_be_enabled }}
            <section>
                <h3><i class="fa fa-cogs"></i> {{ scrum_monomilestone_title }}</h3>
                <div class="agiledashboard-section-details">
                    <div class="alert alert-warning">
                        {{ warning_feature_under_construction }}
                    </div>
                    <label class="checkbox active-scrum">
                        <input
                                type="checkbox"
                                name="activate-scrum-v2"
                                value="1"
                            {{# use_mono_milestone }} checked {{/ use_mono_milestone }}
                        >
                        {{ activate_scrum_mono_milestone_label }}
                    </label>
                    {{{ token }}}
                    <button type="submit" class="btn btn-primary" id="ad-service-submit">{{ config_submit_label }}</button>
                </div>
            </section>
        {{/ can_scrum_mono_milestone_be_enabled }}

        <div class="agiledashboard-admin-section">
            {{# scrum_activated }}
                <div class="alert alert-success">
                    <i class="fa fa-check-circle-o"></i> {{ scrum_activated_label }}
                </div>
            {{/ scrum_activated }}
            {{^ scrum_activated }}
                <div class="alert alert-warning admin-scrum-not-activated">
                    <i class="fa fa-power-off"></i> {{ scrum_not_activated_label }}
                    {{^ has_plannings }}
                        <p>{{ first_scrum_will_be_created }}</p>
                    {{/ has_plannings }}
                </div>
            {{/ scrum_activated }}

            <section>
                <h3><i class="fa fa-cogs"></i> {{ general_settings_section }}</h3>
                <div class="agiledashboard-section-details">

                    <label class="checkbox active-scrum">
                        <input type="checkbox" name="activate-scrum" value="1" {{# scrum_activated }} checked {{/ scrum_activated }}>
                        {{ activate_scrum_label }}
                    </label>
                    <label class="control-label" for="scrum-title-admin">{{ title_label }}</label>
                    <input id="scrum-title-admin" name="scrum-title-admin" type="text" required value="{{ scrum_title }}" placeholder="{{ title_label }}">
                    <p class="help-block"><i class="fa fa-info-circle"></i> {{ title_label_help }}</p>
                    {{{ token }}}
                    <button type="submit" class="btn btn-primary" id="ad-service-submit">{{ config_submit_label }}</button>
                </div>
            </section>

            <section>
                <h3><i class="fa fa-exchange"></i> {{ import_export_section }}</h3>

                <div class="agiledashboard-section-details">
                    <ul class="unstyled">
                        <li>
                            <a href="/plugins/agiledashboard/?group_id={{ group_id }}&amp;action=import-form" id="template_import">
                                <i class="fa fa-download"></i> {{ import_template }}
                            </a>
                        </li>
                        <li>
                            <a href="/plugins/agiledashboard/?group_id={{ group_id }}&amp;action=export-to-file" id="template_export">
                                <i class="fa fa-upload"></i> {{ export_template }}
                            </a>
                        </li>
                    </ul>
                </div>
            </section>

            <section>
                <h3><i class="fa fa-sign-in"></i> {{ planning_section }}</h3>
                <div class="agiledashboard-section-details">
                    {{# has_plannings }}
                    <table class="table plannings">
                        <thead>
                            <tr>
                                <th>Planning</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{# plannings }}
                            <tr class="{{ li_class }}">
                                <td>
                                    <a href="{{ edit_url }}">
                                        {{ name }}
                                    </a>
                                </td>
                                <td>
                                    <a href="{{ edit_url }}">
                                        <i class="fa fa-pencil-square-o"></i> {{ edit_action_label }}
                                    </a>
                                    <a href="{{ delete_url }}">
                                        <i class="fa fa-trash-o"></i> {{ delete_action_label }}
                                    </a>
                                </td>
                            </tr>
                            {{ extra_message }}
                            {{/ plannings }}
                        </tbody>
                    </table>
                    {{/ has_plannings }}
                    {{# does_configuration_allows_planning_creation }}
                        <a href="/plugins/agiledashboard/?group_id={{ group_id }}&amp;action=new" id="planning_create">
                            <i class="fa fa-plus"></i> {{ create_planning }}
                        </a>
                    {{/ does_configuration_allows_planning_creation }}

                    {{^ use_mono_milestone }}
                        {{^ can_create_planning }}
                            <div class="alert alert-info">
                                <i class="fa fa-info-circle"></i> {{ cannot_create_planning }}
                                <ul>
                                    <li>{{ cannot_create_planning_no_trackers }}</li>
                                    <li>{{ cannot_create_planning_hierarchy }}</li>
                                </ul>
                                {{{ cannot_create_planning_config }}}
                            </div>
                        {{/ can_create_planning }}
                    {{/ use_mono_milestone }}
                    {{# use_mono_milestone }}
                        {{^ does_configuration_allows_planning_creation }}
                            <div class="alert alert-info">
                                <i class="fa fa-info-circle"></i> {{ cannot_create_planning_in_scrum_v2 }}
                            </div>
                        {{/ does_configuration_allows_planning_creation }}
                    {{/ use_mono_milestone }}
                </div>
            </section>
        </div>
    </form>

    {{# additional_content }}
        <section>
            {{{ additional_content }}}
        </section>
    {{/ additional_content }}

</div>
